<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //    console.log(Math.random());
      /*   function getstr(min, max) {
            return Math.floor(Math.random() * (max - min)) + min
        }
        console.log(getstr(10, 20)); */
        /* var arr = ['李四', '王三', '吴萨达', '大声道', '地方', '违法']
        function getColor(min,max) {
            return Math.floor(Math.random() * (max - min+1)) + min
        }
        console.log(arr[getColor(0, arr.length - 1)]); */
    /* function getsz(max,min){
return Math.floor(Math.random()*(max-min+1))+min
    }
   var random=getsz(1,10)
   while(true){
       var num=prompt('请输入0~10之间的数')
       if(num>random){
           alert('大了')
       }else if(num<random){
           alert('小了')
       }else{
           alert('棒')
           break
       }
   } */
  /*  var date=new Date()
   console.log(date);
 */
/* var str=new Date('2021-11-11 8:30')
console.log(str); */
/* var year=new Date()
console.log(year.getFullYear()); */
/* var mo=new Date()
console.log(mo.getMonth()+1) */
/* var date=new Date()
console.log(date.getDate()); */
/* var date=new Date()
console.log(date.getDay()); */
var nian=new Date()
// console.log(nian.getyear());
/* var n=nian.getFullYear()
var y=nian.getMonth()+1
var r=nian.getDate()
var arr=['天','一','二','三','四','五','六']
var x=nian.getDay()
console.log('今年是：'+n+'年'+y+'月'+r+'日 '+'星期'+arr[x]);
var da=new Date()
console.log(da.getHours());
console.log(da.getMinutes());
console.log(da.getSeconds());
var date=+new Date()
console.log(date); */
/* var arr=[1,2,3]
arr.push(4,5)
console.log(arr.push(4,5));


console.log(arr);
var arr1=[4,5,6]
arr1.unshift(1,2,3)
console.log(arr1.unshift(1,2,3));

console.log(arr1);
var arr2=[1,2,3,4]
console.log(arr2);
arr2.pop()
console.log(arr2);
var arr3=[1,2,3,4]
console.log(arr3);
arr3.shift()
console.log(arr3); */
/* var a=[1000,1080,1500,2000,1438,1543]
var b=[]
for(var i=0;i<=a.length;i++){
    if(a[i]>1500){
        b.push(a[i])
    }
}
console.log(b );
var a=[1000,1080,1500,2000,1438,1543,999,10,5,44]
a.sort(function(a,b){
    return b-a
})
console.log(a); */
// var a=['red','blue','green','pink']
/* var a=[1,2,3,4]
/* a.reverse()
console.log(a); */
// console.log(a.indexOf(3)); */
/* function getfn(arr){

    var x=[]
    for(var i=0;i<arr.length;i++){
        if(x.indexOf(arr[i])===-1){
            x.push(arr[i])
        }
        
    }
    return x
}
var b=getfn([1,3,4,2,3,4,5,3,7,6,1,8])
console.log(b);
 */
/* function getfn(arr){
    var arr1=[]
    for(var i=0;i<arr.length;i++){
        if(arr1.indexOf(arr[i])===-1){
            arr1.push(arr[i])
        }
    }
    return arr1

}
var arr2=getfn([1,1,2,2,3,3,4,4,5,5])
console.log(arr2);

 */
var arr='abcde'
/* console.log(arr.toString())
console.log(arr.join('$')); */
console.log(arr.charAt(3));
for(var i=0;i<arr.length;i++){
    console.log(arr.charAt(i));
}
console.log(arr.charCodeAt(0));
console.log(arr[0]);
var a={
    nane:'张三'
}
if(a['nane']){
    console.log('有');
}else{
    console.log('没有');
}
    </script>

</body>

</html>